
<!DOCTYPE html>

<html>
  
<!-- Mirrored from docs.sympy.org/latest/modules/physics/optics/medium.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:27:38 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>Medium &#8212; SymPy 1.9 documentation</title>
    <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/default.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/graphviz.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/plot_directive.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-core.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-autocomplete.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-sphinx.css" />
    
    <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
    <script src="../../../_static/jquery.js"></script>
    <script src="../../../_static/underscore.js"></script>
    <script src="../../../_static/doctools.js"></script>
    <script src="../../../../../live.sympy.org/static/utilities.js"></script>
    <script src="../../../../../live.sympy.org/static/external/classy.js"></script>
    <script src="../../../../../live.sympy.org/static/live-core.js"></script>
    <script src="../../../../../live.sympy.org/static/live-autocomplete.js"></script>
    <script src="../../../../../live.sympy.org/static/live-sphinx.js"></script>
    
    <link rel="shortcut icon" href="../../../_static/sympy-notailtext-favicon.ico"/>
    <link href="medium.html" rel="canonical" />
    
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" />
    <link rel="next" title="Polarization" href="polarization.html" />
    <link rel="prev" title="Gaussian Optics" href="gaussopt.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="polarization.html" title="Polarization"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="gaussopt.html" title="Gaussian Optics"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../index.html" >Physics</a> &#187;</li>
          <li class="nav-item nav-item-3"><a href="index.html" accesskey="U">Optics Module</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Medium</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="module-sympy.physics.optics.medium">
<span id="medium"></span><h1>Medium<a class="headerlink" href="#module-sympy.physics.optics.medium" title="Permalink to this headline">¶</a></h1>
<p><strong>Contains</strong></p>
<ul class="simple">
<li><p>Medium</p></li>
</ul>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.physics.optics.medium.Medium">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.physics.optics.medium.</span></span><span class="sig-name descname"><span class="pre">Medium</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">permittivity</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">permeability</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">n</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/optics/medium.py#L19-L203"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.optics.medium.Medium" title="Permalink to this definition">¶</a></dt>
<dd><p>This class represents an optical medium. The prime reason to implement this is
to facilitate refraction, Fermat’s principle, etc.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name: string</strong></p>
<blockquote>
<div><p>The display name of the Medium.</p>
</div></blockquote>
<p><strong>permittivity: Sympifyable</strong></p>
<blockquote>
<div><p>Electric permittivity of the space.</p>
</div></blockquote>
<p><strong>permeability: Sympifyable</strong></p>
<blockquote>
<div><p>Magnetic permeability of the space.</p>
</div></blockquote>
<p><strong>n: Sympifyable</strong></p>
<blockquote>
<div><p>Index of refraction of the medium.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Explanation</p>
<p>An optical medium is a material through which electromagnetic waves propagate.
The permittivity and permeability of the medium define how electromagnetic
waves propagate in it.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">epsilon</span><span class="p">,</span> <span class="n">mu</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics</span> <span class="kn">import</span> <span class="n">Medium</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m1</span> <span class="o">=</span> <span class="n">Medium</span><span class="p">(</span><span class="s1">&#39;m1&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m2</span> <span class="o">=</span> <span class="n">Medium</span><span class="p">(</span><span class="s1">&#39;m2&#39;</span><span class="p">,</span> <span class="n">epsilon</span><span class="p">,</span> <span class="n">mu</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m1</span><span class="o">.</span><span class="n">intrinsic_impedance</span>
<span class="go">149896229*pi*kilogram*meter**2/(1250000*ampere**2*second**3)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m2</span><span class="o">.</span><span class="n">refractive_index</span>
<span class="go">299792458*meter*sqrt(epsilon*mu)/second</span>
</pre></div>
</div>
<p class="rubric">References</p>
<dl class="citation">
<dt class="label" id="r614"><span class="brackets"><a class="fn-backref" href="#id1">R614</a></span></dt>
<dd><p><a class="reference external" href="https://en.wikipedia.org/wiki/Optical_medium">https://en.wikipedia.org/wiki/Optical_medium</a></p>
</dd>
</dl>
<dl class="py property">
<dt class="sig sig-object py" id="sympy.physics.optics.medium.Medium.intrinsic_impedance">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">intrinsic_impedance</span></span><a class="headerlink" href="#sympy.physics.optics.medium.Medium.intrinsic_impedance" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns intrinsic impedance of the medium.</p>
<p class="rubric">Explanation</p>
<p>The intrinsic impedance of a medium is the ratio of the
transverse components of the electric and magnetic fields
of the electromagnetic wave travelling in the medium.
In a region with no electrical conductivity it simplifies
to the square root of ratio of magnetic permeability to
electric permittivity.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics</span> <span class="kn">import</span> <span class="n">Medium</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">Medium</span><span class="p">(</span><span class="s1">&#39;m&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">intrinsic_impedance</span>
<span class="go">149896229*pi*kilogram*meter**2/(1250000*ampere**2*second**3)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.physics.optics.medium.Medium.permeability">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">permeability</span></span><a class="headerlink" href="#sympy.physics.optics.medium.Medium.permeability" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns magnetic permeability of the medium.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics</span> <span class="kn">import</span> <span class="n">Medium</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">Medium</span><span class="p">(</span><span class="s1">&#39;m&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">permeability</span>
<span class="go">pi*kilogram*meter/(2500000*ampere**2*second**2)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.physics.optics.medium.Medium.permittivity">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">permittivity</span></span><a class="headerlink" href="#sympy.physics.optics.medium.Medium.permittivity" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns electric permittivity of the medium.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics</span> <span class="kn">import</span> <span class="n">Medium</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">Medium</span><span class="p">(</span><span class="s1">&#39;m&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">permittivity</span>
<span class="go">625000*ampere**2*second**4/(22468879468420441*pi*kilogram*meter**3)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.physics.optics.medium.Medium.refractive_index">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">refractive_index</span></span><a class="headerlink" href="#sympy.physics.optics.medium.Medium.refractive_index" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns refractive index of the medium.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics</span> <span class="kn">import</span> <span class="n">Medium</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">Medium</span><span class="p">(</span><span class="s1">&#39;m&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">refractive_index</span>
<span class="go">1</span>
</pre></div>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.physics.optics.medium.Medium.speed">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">speed</span></span><a class="headerlink" href="#sympy.physics.optics.medium.Medium.speed" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns speed of the electromagnetic wave travelling in the medium.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics</span> <span class="kn">import</span> <span class="n">Medium</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">Medium</span><span class="p">(</span><span class="s1">&#39;m&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">speed</span>
<span class="go">299792458*meter/second</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m2</span> <span class="o">=</span> <span class="n">Medium</span><span class="p">(</span><span class="s1">&#39;m2&#39;</span><span class="p">,</span> <span class="n">n</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">speed</span> <span class="o">==</span> <span class="n">m2</span><span class="o">.</span><span class="n">speed</span>
<span class="go">True</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../../index.html">
              <img class="logo" src="../../../_static/sympylogo.png" alt="Logo"/>
            </a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="gaussopt.html"
                        title="previous chapter">Gaussian Optics</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="polarization.html"
                        title="next chapter">Polarization</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../../_sources/modules/physics/optics/medium.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="https://docs.sympy.org/latest/search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="polarization.html" title="Polarization"
             >next</a> |</li>
        <li class="right" >
          <a href="gaussopt.html" title="Gaussian Optics"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../index.html" >Physics</a> &#187;</li>
          <li class="nav-item nav-item-3"><a href="index.html" >Optics Module</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Medium</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2021 SymPy Development Team.
      Last updated on Sep 30, 2021.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.1.2.
    </div>
  </body>

<!-- Mirrored from docs.sympy.org/latest/modules/physics/optics/medium.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:27:38 GMT -->
</html>